//
//  CYDataAPI.h
//  cyjf
//
//  Created by tauCross on 2017/5/10.
//  Copyright © 2017年 Auto Financing. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "CYDataAPIEnums.h"



#define CYStandardDataAPI [CYDataAPI standardDataAPI]
#define CY_API_PAGE_SIZE 10
#define CYHideAllCustomViewOnWindowNotification @"CYHideAllCustomViewOnWindowNotification"




@interface CYResponse : NSObject

@property(nonatomic, assign)NSInteger code;
@property(nonatomic, strong)NSString *message;
@property(nonatomic, strong)id content;

@end



typedef void (^CYDataAPIComplete)(CYResponse *response);



@interface CYDataAPI : NSObject

+ (instancetype)standardDataAPI;

#pragma mark - user
- (void)user_getSmsCodeWithMobile:(NSString *)mobile
                         sms_type:(CYDataAPISMSCodeType)sms_type
                         complete:(CYDataAPIComplete)complete;

- (void)user_registerWithMobile:(NSString *)mobile
               mobile_auth_code:(NSString *)mobile_auth_code
                       password:(NSString *)password
                       complete:(CYDataAPIComplete)complete;

- (void)user_loginWithMobile:(NSString *)mobile
                    password:(NSString *)password
                    complete:(CYDataAPIComplete)complete;

- (void)user_queryBindBankCardWithComplete:(CYDataAPIComplete)complete;

- (void)user_projectInvestLogWithId:(NSNumber *)id
                            page_no:(NSNumber *)page_no
                           complete:(CYDataAPIComplete)complete;

- (void)user_preWalletRechargeWithAmount:(NSString *)amount
                            bank_card_no:(NSString *)bank_card_no
                                 card_no:(NSString *)card_no
                                  mobile:(NSString *)mobile
                                 pay_way:(CYDataAPIPayWay)pay_way
                               real_name:(NSString *)real_name
                                complete:(CYDataAPIComplete)complete;

- (void)user_walletRechargeWithMobile_auth_code:(NSString *)mobile_auth_code
                                        pay_way:(CYDataAPIPayWay)pay_way
                                    recharge_no:(NSString *)recharge_no
                                       complete:(CYDataAPIComplete)complete;

- (void)user_userAccountWithComplete:(CYDataAPIComplete)complete;

- (void)user_modifyPasswordWithMobile:(NSString *)mobile
                     mobile_auth_code:(NSString *)mobile_auth_code
                             password:(NSString *)password
                             complete:(CYDataAPIComplete)complete;

- (void)user_logoutWithComplete:(CYDataAPIComplete)complete;

- (void)user_walletDetailWithPage_no:(NSNumber *)page_no
                                type:(CYDataAPIWalletDetailType)type
                            complete:(CYDataAPIComplete)complete;

- (void)user_preWithdrawalWithBank_id:(NSNumber *)bank_id
                             complete:(CYDataAPIComplete)complete;

- (void)user_withdrawalWithAmount:(NSNumber *)amount
                          bank_id:(NSNumber *)bank_id
                         complete:(CYDataAPIComplete)complete;

- (void)user_withdrawalDetailWithPage_no:(NSNumber *)page_no
                                complete:(CYDataAPIComplete)complete;

- (void)user_queryAllInvestDetailWithPage_no:(NSNumber *)page_no
                                      status:(CYDataAPIInvestRecordStatus)status
                                    complete:(CYDataAPIComplete)complete;

- (void)user_dueDetailWithInvest_detail_id:(NSNumber *)invest_detail_id
                                  complete:(CYDataAPIComplete)complete;

- (void)user_checkVersionWithComplete:(CYDataAPIComplete)complete;

- (void)user_userBillDetailWithPageNo:(NSNumber *)pageNo
                             complete:(CYDataAPIComplete)complete;

- (void)user_reportSuggestWithContent:(NSString *)content
                           contactWay:(NSString *)contactWay
                             complete:(CYDataAPIComplete)complete;

- (void)user_queryCouponWithStatus:(CYDataAPICouponStatus)status
                           page_no:(NSNumber *)page_no
                          complete:(CYDataAPIComplete)complete;

- (void)user_couponPromptInfoWithComplete:(CYDataAPIComplete)complete;

- (void)user_rechargeRecordWithPage_no:(NSNumber *)page_no
                              complete:(CYDataAPIComplete)complete;

- (void)user_userBillInfoWithComplete:(CYDataAPIComplete)complete;

- (void)user_getSysStatusWithComplete:(CYDataAPIComplete)complete;

#pragma mark - user/investmentLog
- (void)user_investmentLog_addWithCode:(NSInteger)code
                                flowId:(NSString *)flowId
                             isSuccess:(BOOL)isSuccess
                                   msg:(NSString *)msg
                              complete:(CYDataAPIComplete)complete;

#pragma mark - message
- (void)message_bannerListWithPosition:(CYDataAPIBannerPosition)position
                              complete:(CYDataAPIComplete)complete;

- (void)message_readAllWithType:(CYDataAPIMessageType)type
                       complete:(CYDataAPIComplete)complete;

- (void)message_unreadCountWithType:(CYDataAPIMessageType)type
                           complete:(CYDataAPIComplete)complete;

#pragma mark - project
- (void)project_queryRecommendProjectWithComplete:(CYDataAPIComplete)complete;

- (void)project_projectListWithComplete:(CYDataAPIComplete)complete;

- (void)project_detailWithID:(NSNumber *)id
                    complete:(CYDataAPIComplete)complete;

- (void)project_bindCardWithBank_card_no:(NSString *)bank_card_no
                                 card_no:(NSString *)card_no
                                  mobile:(NSString *)mobile
                        mobile_auth_code:(NSString *)mobile_auth_code
                               real_name:(NSString *)real_name
                                complete:(CYDataAPIComplete)complete;

- (void)project_payWayListWithAmount:(NSNumber *)amount
                          project_id:(NSNumber *)project_id
                      user_coupon_id:(NSNumber *)user_coupon_id
                            complete:(CYDataAPIComplete)complete;

- (void)project_preInvestWithAmount:(NSNumber *)amount
                       bank_card_no:(NSString *)bank_card_no
                            card_no:(NSString *)card_no
                             mobile:(NSString *)mobile
                            pay_way:(NSNumber *)pay_way
                         project_id:(NSNumber *)project_id
                          real_name:(NSString *)real_name
                     user_coupon_id:(NSNumber *)user_coupon_id
                           complete:(CYDataAPIComplete)complete;

- (void)project_InvestWithMobile_auth_code:(NSString *)mobile_auth_code
                                   pay_way:(NSNumber *)pay_way
                               recharge_no:(NSString *)recharge_no
                            user_coupon_id:(NSNumber *)user_coupon_id
                                  complete:(CYDataAPIComplete)complete;

- (void)project_queryUserCouponWithAmount:(NSString *)amount
                                projectId:(NSNumber *)projectId
                                 complete:(CYDataAPIComplete)complete;

- (void)project_querySelloutWithPage_no:(NSNumber *)page_no
                               complete:(CYDataAPIComplete)complete;

#pragma mark - news
- (void)news_getListWithPage_no:(NSNumber *)page_no
                       complete:(CYDataAPIComplete)complete;

- (void)news_getTopTwoListWithComplete:(CYDataAPIComplete)complete;

#pragma mark - riskEvaluate
- (void)riskEvaluate_getRiskByTokenWithComplete:(CYDataAPIComplete)complete;

#pragma mark - advertisement
- (void)advertisement_getListWithPosition:(CYDataAPIAdvertisementPosition)position
                                  page_no:(NSNumber *)page_no
                                 complete:(CYDataAPIComplete)complete;

- (void)advertisement_recentActivitiesWithPage_no:(NSNumber *)page_no
                                         complete:(CYDataAPIComplete)complete;

#pragma mark - advertisement/index
- (void)advertisement_index_navWithComplete:(CYDataAPIComplete)complete;

#pragma mark - channel
- (void)channel_saveLogWithComplete:(CYDataAPIComplete)complete;

@end
